angular.module('myshare', [
        'ui.router',
        'ngAnimate',
        'module.homepage',
        'module.share',
        'module.invite',
        'module.filter',
        'service.auth',
        'service.template',
        'service.entrance',
        'service.sharesum',
        'service.sharewithd'
    ])
    .run(
        ['$rootScope', '$state', '$stateParams',
            function ($rootScope, $state, $stateParams) {
                $rootScope.$state = $state;
                $rootScope.$stateParams = $stateParams;
            }
        ]
    )
    /*.config(['$httpProvider', function ($httpProvider) {
     $httpProvider.defaults.withCredentials = true;
     }])*/
    .config(
        ['$stateProvider', '$urlRouterProvider', '$locationProvider',
            function ($stateProvider, $urlRouterProvider, $locationProvider) {
                $locationProvider.html5Mode(html5mode);
                $urlRouterProvider.otherwise('/sharelist');
            }
        ]
    );